<template>
	<view class="iconfont" :class="'icon-' + icon" :style="{ color: color, 'font-size': size + 'px' }" @click="_onClick"></view>
</template>

<script>
	export default {
		name: 'iconfont',
		props: {
			icon: {
				type: String,
				default: ''
			},
			color: {
				type: String,
				default: '#333333'
			},
			size: {
				type: [Number, String],
				default: 16
			}
		},
		methods: {
			_onClick() {
				this.$emit('click');
			}
		}
	};
</script>

<style lang="scss">
	@import './icon.css';
</style>